import streamlit as st

with st.form(key="form1"):
    response_info = {
        "name":None,
        "team":None,
        "share_info":None,
        "email_info":None,
        "age_info":None
    }

    response_info["name"] = st.text_input("Name")
    response_info["team"] = st.selectbox("favorate team:", ["Arsenal", "Man City", "Man United", "Chelsea", "Liverpool"])
    response_info["share_info"] = st.radio("Share my information?", ["Yes", "No"])
    response_info["email_info"] = st.checkbox("Receive Email notication")
    response_info["age_info"] = st.slider("Age", 0, 100)

    submit_button = st.form_submit_button(label="Submit!")

    def check_form_validity(response_info):
        values = response_info.values()
        return all([True if (val != None and val != "") else False for val in values])

    if submit_button:
        if check_form_validity(response_info):
            st.balloons()
            st.write("Form submitted successfully!")
        else:
            st.warning("Please fill out all the fields!")
print(response_info)
response_info